namespace  Source.Web.FrameWork
{
    public interface IConfigurationProvider
    {
        string HeaderPage { get; }
        string ApplicationVersion { get; }
        bool ShowErrorDetails { get; }
        string X500SearchPage { get; }

        bool IsSsoEnabled { get; }
        string SsoLoginUrl { get; }
        string SsoLogoutUrl { get; }
        string SsoHeaderVariable { get; }
    }

    public class ConfigurationProvider : IConfigurationProvider
    {
        private readonly WebConfiguration configuration;

        public ConfigurationProvider()
        {
            configuration = WebConfiguration.LoadConfiguration();
        }

        public string HeaderPage { get { return configuration.HeaderPage; } }
        public string ApplicationVersion { get { return configuration.ApplicationVersion; } }
        public bool ShowErrorDetails { get { return configuration.ShowErrorDetails; } }
        public string X500SearchPage { get { return configuration.X500SearchPage; } }

        public bool IsSsoEnabled { get { return configuration.IsSsoEnabled; } }
        public string SsoLoginUrl { get { return configuration.SsoLoginUrl; } }
        public string SsoLogoutUrl { get { return configuration.SsoLogoutUrl; } }
        public string SsoHeaderVariable { get { return configuration.SsoHeaderVariable; } }
    }
}